<template>
<div class="public-common">
    <!--业务办理 && 机打票入库管理-->
    <div class="public-title">机打票入库管理列表</div>
    <div class="public-searchbox">
        <el-row>
            <el-col :span="6">
                <el-input placeholder="请输入内容" v-model="form.test" class="input-with-select"  size="mini" />
            </el-col>
            <el-col :span="18">
                <el-button type="primary" icon="el-icon-search" size="mini"  style="margin-left:10px;">搜索</el-button>
                <el-button type="success" size="mini"  icon="el-icon-edit-outline">新建</el-button>
                <el-button type="danger" size="mini"  icon="el-icon-delete">删除</el-button>
            </el-col>
        </el-row>
    </div>
    <el-scrollbar class="public-scroll">
        <el-table :data="tabledata" size="mini" border stripe header-row-class-name="textcenter">
            <el-table-column
            type="selection"
            width="55" fixed="left">
            </el-table-column>
            <el-table-column
                label="车牌号">
                <template slot-scope="scope">
                    {{scope.row.carId}}
                </template>
            </el-table-column>
            <el-table-column
                label="发票代码">
                <template slot-scope="scope">
                    {{scope.row.carId}}
                </template>
            </el-table-column>                
            <el-table-column
                label="开始票号">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="结束票号">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="类型">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="卷数">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="操作人">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="操作时间">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="操作" fixed="right">
                <template slot-scope="scope">
                    <el-button type="primary" size="mini">编辑</el-button>
                </template>
            </el-table-column>             
        </el-table>
    </el-scrollbar>
    <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="page.now"
        :page-sizes="page.sizes"
        :page-size="page.pagesize"
        layout="total, sizes, prev, pager, next, jumper"
        :total="page.total" style="margin-top:10px;">
    </el-pagination>

    <!--dialog-->
    <el-dialog title="机打票入库管理" :visible.sync="dialog.isVisible" width="500px" top="10vh">
        <el-scrollbar style="height:300px;">
            <div style="overflow:hidden;">
                <div class="public-box">
                    <div class="public-box-tit"></div>
                    <el-form size="mini" label-width="40px">
                        <el-row>
                            <el-col :span="12">
                                <el-form-item label="仓库">
                                    <el-select v-model="dialog.carid" placeholder="请选择" style="width:100%;">
                                        <el-option
                                        v-for="item in select.carids"
                                        :key="item.value"
                                        :label="item.label"
                                        :value="item.value">
                                        </el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
                            <el-col :span="12">
                                <el-form-item label="">
                                <el-radio v-model="dialog.cktype" label="1">机打票</el-radio>
                                <el-radio v-model="dialog.cktype" label="2">手撕票</el-radio>
                                </el-form-item>
                            </el-col>
                        </el-row>
                    </el-form>
                </div>
                <div class="public-box">
                    <div class="public-box-tit">发票代码号</div>
                    <el-form size="mini" label-width="40px">
                    <el-row>
                        <el-col :span="12">
                            <el-form-item label="">
                                <el-input v-model="dialog.test"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    </el-form>
                </div>
                <div class="public-box">
                    <div class="public-box-tit">手撕票起止票号</div>
                    <el-form size="mini" label-width="40px">
                        <el-row>
                            <el-col :span="12">
                                <el-form-item label="">
                                    <el-input v-model="dialog.test"></el-input>
                                </el-form-item>
                            </el-col>
                            <el-col :span="12">
                                <el-form-item label="至">
                                    <el-input v-model="dialog.test"></el-input>
                                </el-form-item>
                            </el-col>
                        </el-row>
                    </el-form>
                </div>
            </div>            
        </el-scrollbar>
        <div class="textcenter" style="padding-top:10px;">
            <el-button type="primary" size="mini">确定</el-button>  
            <el-button type="info" @click="dialog.isVisible = false" size="mini">返回</el-button>
        </div>
    </el-dialog>
</div>
</template>
<script>
export default {
    data(){
        return {
            form:{
                test:''
            },
            tabledata:[],
            page:{
              now:1,
              pagesize:10,
              sizes:[2,10, 20, 50, 100],
              total:0,
              key:''
            },
            select:{
                carids:[],
                types:[]
            },
            dialog:{
                isVisible:false,
                test:''
            }
        }
    },
    components:{
    },
    mounted(){
        
    },
    methods:{
        getValue(html){

        },
        handleChange(file, fileList){
            console.log("file",file)
        },
        search(){
            alert("search")
        },
        //分页
        handleSizeChange(pagesize){
            this.page.pagesize = pagesize;
            this.search(true,true);
        },
        handleCurrentChange(pageno){
            this.page.now = pageno;
            this.search(true,true);
        }

    }
}
</script>